<template>
	<u-navbar
		:autoBack="true"
		:height="60"
		:leftIconSize="40"
		:fixed="true"
		:title="title"
		:leftIcon="showBackButton ? 'arrow-left': ''"
		leftIconColor="#b9b9b9"
		:bgColor="`rgb(255 255 255 / ${setScrollTop}%)`"
	>  
	</u-navbar>
</template>

<script>
	export default{
		props:{
			title:{
				type: String,
				default:''
			},
			scrollTop: {
				type: Number,
				default:60
			}
		},
		data(){
			return {
				showBackButton: false
			}
		},
		computed: {
			setScrollTop(){
				return this.scrollTop>=60 ? 100 : this.scrollTop/1
			} 
		},
		mounted() {
			if(getCurrentPages().length > 2){
				this.showBackButton = true
			}
			console.log(this.showBackButton)
		}             
	}
</script>

<style scoped>
	
</style>